package g4p.tests;

import g4p_controls.GPanel;
import g4p_controls.GSketchPad;
import processing.core.PApplet;

public class GetPositionTest extends PApplet {

	
	private GPanel panel1;
	private GSketchPad sketchPad1;
	private float x,cx;
	private float y,cy;

	public void setup(){
		size(500,500);
		
		panel1 = new GPanel(this, 0, 0, 344, 415, "Tab bar text");
		sketchPad1 = new GSketchPad(this, 2, 21, 280, 280);

		println("#nPosition on screen");
		x = sketchPad1.getX();
		y = sketchPad1.getY();
		cx = sketchPad1.getCX();
		cy = sketchPad1.getCY();
		
		System.out.println(x + "  " + y);
		System.out.println(cx + "  " + cy);
		
		panel1.addControls(sketchPad1);
		
		println("#nPosition on panel");
		x = sketchPad1.getX();
		y = sketchPad1.getY();
		cx = sketchPad1.getCX();
		cy = sketchPad1.getCY();
		
		System.out.println(x + "  " + y);
		System.out.println(cx + "  " + cy);
	}
	
	public void draw(){
		background(200);
	}
}
